package com.vhans.db.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vhans.core.domain.AVisitLog;
import com.vhans.db.mapper.AVisitLogMapper;
import com.vhans.db.model.dto.ConditionDTO;
import com.vhans.db.service.IAVisitLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 访问业务接口实现类
 *
 * @author vhans
 */
@Service
public class AVisitLogServiceImpl extends ServiceImpl<AVisitLogMapper, AVisitLog> implements IAVisitLogService {

    @Autowired
    private AVisitLogMapper visitLogMapper;

    @Override
    public void saveVisitLog(AVisitLog visitLog) {
        // 保存访问日志
        visitLogMapper.insert(visitLog);
    }

    @Override
    public List<AVisitLog> listVisitLog(ConditionDTO condition) {
        // 查询访问日志列表
        return visitLogMapper.selectVisitLogList(condition.getKeyword());
    }
}




